﻿@using VoteInformationSystem.Models
@{
    ViewBag.Title = "Q1 " + ViewBag.Bundestagswahl.Jahr;
}

@section scripts
{
    <!--<script type="text/javascript">
        
        $.post('/Home/getPieChartData/?Jahr=@ViewBag.Bundestagswahl.Jahr', {},
            function(data) {
                var str = new String();

                str = str + "<table border=1>";

                for (var i = 0; i < data.length; i++) {
                    str = str + "<tr><td" + (data[i].Parteiname) + "</td><td>";
                    str = str + (data[i].AnzahlPlaetze) + "</td><td>";
                    str = str + (data[i].Farbe) + "</td><td>";
                    str = str + ("</td></tr>");
                }

                str += "</table>";

                $("div#table_ergebnisse_div").html(str);
            });
            
    </script>-->

}

@section featured
{
	<section class="featured">
		<div class="content-wrapper">
			<hgroup class="title">
				<h1>Q1 @ViewBag.Bundestagswahl.Jahr</h1>
				<h2>Ergebnisse auf Bundesebene</h2>
			</hgroup>
		</div>
	</section>
}

<div>
    <div>
        <a href="/Home/Index">Home</a> &gt; <b>Q1 @ViewBag.Bundestagswahl.Jahr</b>
    </div>

    <div>
        <div id="chart_div" style="width: 900px; height: 500px;"></div>
        <div id="table_ergebnisse_div" style="width: 900px;">
            <table>
            @foreach (PlaetzeverteilungBundestag b in ViewBag.PlaetzeVerteilung)
            {
                <tr style="color:#@b.Farbe">
                    <td>
                        @Html.Raw(b.Parteiname)
                    </td>
                    <td>
                        @Html.Raw(b.AnzahlPlaetze)
                    </td>
                </tr>
            }
            </table>
        </div>
    </div>
</div>
